# #!/usr/bin/env python
# # -*- encoding: utf-8 -*-
# '''
# @File    :   Bootloader_SID_Not_Supprot_test.py
# @Time    :   2022/09/06 13:31:28
# @Author  :   YangLiang 
# @Version :   1.0
# @Contact :   yangliang@chengtech.com
# @License :   (C)Copyright 2022-2025
# @Desc    :   None
# '''

# # here put the import lib
# from numpy import byte, bytes_, int16
# from pytest_assume.plugin import assume
 
# import pytest
# import time
# import requests
# from sympy import I
# # from sympy import assuming
# from commDriver.TS_CAN import *
# import allure
# import sys
# from collections.abc import Iterable

# from sqlalchemy import false
# sys.dont_write_bytecode = True

# SID_Req = [
#                ([0x14,0xFF,0xFF,0xFF],[0x7F,0x14,0x7F]),  
#                ([0x19,0x02,0x0B],[0x7F,0x19,0x7F]),
#                ([0x28,0x00,0x01],[0x7F,0x28,0x7F]),
#                ([0x28,0x01,0x01],[0x7F,0x28,0x7F]),
#                ([0x28,0x03,0x01],[0x7F,0x28,0x7F]),
#                # ([0x85,0x02],[0x7F,0x85,0x7F]),                   #BYD 85服务Boot支持
#                # ([0x85,0x01],[0x7F,0x85,0x7F]),
#                ([0x2E,0x3A,0x01,0xE4],[0x7F,0x2E,0x7F]),
#                # ([0x31,0x02,0x3F,0x15,0x01],[0x7F,0x31,0x31]),    #BYD 31服务Boot支持
#                # ([0x31,0x82,0x3F,0x15,0x01],[0x7F,0x31,0x31])
#                ]


# class Test_SID_Not_Supprot_Phy(object):
#      @allure.severity('normal')
#      @allure.story('ECU not support SID test')
#      @allure.title('SID that not supported in bootloader')
#      @allure.description('Test SID that not supported in bootloader')
#      
#      @pytest.mark.parametrize('req, resp', SID_Req,ids=["req:{0}".format(binascii.b2a_hex(bytearray(req),' '), resp) for req, resp in SID_Req])
#      def test_SID_Not_Supprot_Phy(self,action,Driver,req,resp):
#           time.sleep(0.1)
#           iStep = 1
#           # 扩展模式1101 积极响应
#           iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, [], 2, iStep, True)
